package com.xmut.mall.member.feign;

import com.xmut.mall.member.utils.RespBean;
import com.xmut.mall.member.vo.OrderItemEntityVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("mall-order")
public interface OrderFeignService {

    @PutMapping("/order/orderitem/updateOrderItem")
    RespBean updateOrderItem(@RequestBody OrderItemEntityVo entity);

    /**
     * 根据SN获取订单项
     * @param sn
     * @return
     */
    @GetMapping("/order/orderitem/getOrderItemBySn/{sn}")
    RespBean getOrderItemBySn(@PathVariable String sn);

    @GetMapping("/order/order/getOrderBySn/{sn}")
    RespBean getOrderBySn(@PathVariable String sn);
}
